import request from '@/utils/http.js'


// 添加关联关系
export const saveAttrCategoryApi = (data) => {
  return request({
    url: 'pms/backend/attrRelate/save',
    method: "POST",
    data: JSON.stringify(data),
  })
}

// 根据属性id获取关联分类
export const getCategorysByAttrIdApi = (attrId) => {
  return request({
    url: `pms/backend/attrRelate/list/${attrId}`,
    method: "GET",
  })
}

// 根据id删除关联
export const deleteAttrCategoryApi = (id) => {
  return request({
    url: `pms/backend/attrRelate/delete/${id}`,
    method: "DELETE",
  })
}